Skip to content

doc: decision record for Cloudflare Workers rendezvous/relay component (#5794) - #6260

Merged
dezren39 merged 3 commits into
mainfrom
queue/10586-5794-workers-rendezvous-relay
Nov 5, 2026
Merged

dezren39 merged 3 commits into
mainfrom
queue/10586-5794-workers-rendezvous-relay

Conversation

@dezren39

@dezren39 dezren39 commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Decision record for #5794 (queue task 10586, follow-up from triage task 10197).

Adds doc/2026-11-05T15-10-00Z_design_cloudflare_workers_rendezvous_relay.md:

  • Chosen shape: two narrow roles only — (1) signed rendezvous/directory over HTTPS, (2) bounded application-layer WebSocket relay pairing two outbound connections in one Durable Object per pair. Not a transport peer: no QUIC/UDP/inbound TCP is possible on Workers.
  • When it is / isn't the right shape, with the self-hosted id broker required for sovereignty, UDP semantics, bulk, and inbound-TCP cases; both shapes share the same signed records and id: design: ID transport fallback for UDP-denied networks v1 #5671 broker contract (parity contract).
  • Limits verified 2026-11-05 against Cloudflare's primary docs (6 simultaneous outgoing connections/invocation, 32,768 hibernatable WebSockets/DO, 1 MiB DO WebSocket message, no UDP, connect() restrictions), each tied to its design consequence; facts marked verified vs judgment.
  • Rejected alternatives (iroh/DERP relay on Workers, connect()-TCP relay, HTTP polling relay, folding into P7.2, no Workers component), abuse/auth/metadata invariants written as future acceptance tests, explicit distinction from P7.2 pkarr lookup, and a parent boundary section: no change to id: design: ID transport fallback for UDP-denied networks v1 #5671.

Decision-record-only: no source code or deployment changes, per task 10586 scope. No code tests apply; verification is citation + parent-consistency, stated in the record's oracle section.

Closes #5794.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 5, 2026 15:22
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 955837f1-6e0b-4e1f-9adb-4c7c4a88644a
Commits

Reviewing files that changed from the base of the PR and between 2a67620 and bfc2f76.

Files selected for processing: 1

  • doc/2026-11-05T15-10-00Z_design_cloudflare_workers_rendezvous_relay.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T15:54:16.827176Z bfc2f76 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 384a6562e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +147 to +149
- **Workers as an iroh/DERP relay or QUIC peer.** Impossible on the
platform (no UDP), not merely hard. Rejected by physics, recorded so
it is not re-proposed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Distinguish an iroh relay from a QUIC endpoint

For the UDP-denied case this component targets, missing UDP sockets does not rule out an iroh-compatible relay: iroh's protocol description explains that endpoints connect over HTTPS, upgrade to WebSockets, and exchange encrypted datagrams through a forwarder that does not terminate QUIC. This rejection conflates running a QUIC endpoint with forwarding its encapsulated packets, excluding a potentially compatible alternative on an incorrect platform premise. Evaluate relay-protocol compatibility separately; lack of UDP alone is not sufficient grounds to require a self-hosted relay.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 76a8923. Agreed — the record conflated endpoint-hood with relay forwarding. It now distinguishes the two explicitly: a Worker cannot be a QUIC/iroh endpoint (no UDP), but iroh relay forwarding is HTTPS/WebSocket-shaped and is not ruled out by the platform wall; wire-compatibility of the pairing with the iroh relay protocol is recorded as a required implementation-time evaluation, open in both directions, and the self-hosted-required section was narrowed accordingly.

Comment on lines +124 to +127
- **WebSocket message size in Durable Objects: 1 MiB** (Workers limits
doc, Durable Objects table) **[verified 2026-11-05]**. Consequence:
frames above 1 MiB must be chunked by the *endpoints'* framing layer;
the relay forwards frames, it does not reassemble streams.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct the platform limit before requiring 1 MiB chunking

For future implementations handling messages larger than 1 MiB, this incorrectly makes endpoint-level chunking a platform requirement. Cloudflare's Durable Objects limits list a received WebSocket message limit of 32 MiB for both storage backends, not 1 MiB. Correct the verified limit and its framing consequence, or explicitly identify 1 MiB as a deliberate application cap rather than a Cloudflare restriction; otherwise the record imposes unnecessary framing work and uses an understated limit to justify its throughput constraints.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 76a8923. Verified against the Durable Objects limits doc (linked in the record header): received WebSocket message limit is 32 MiB for both storage backends. The record now states 32 MiB as the platform limit, and presents a smaller frame cap (1 MiB suggested) explicitly as a deliberate application-level judgment (per-message CPU/memory/head-of-line bounds), not a Cloudflare restriction.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 76a892361b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +182 to +183
a worse product and a more expensive one; WebSocket upgrade is plain
HTTPS and passes the same egress. Rejected except as a possible

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Distinguish HTTPS reachability from WebSocket availability

For restricted networks whose proxy permits HTTPS requests but blocks WebSocket upgrades, this relay remains unreachable even though HTTP polling could work. WebSocket traffic does not necessarily pass the same egress: Microsoft's transport documentation explicitly describes falling back to long polling when a proxy blocks WebSockets. This distinction matters for the component's UDP-denied-network use case and invalidates the reachability premise used here to reject polling. Explicitly require WebSocket-capable egress in the supported-environment criteria and acknowledge the HTTPS-only coverage gap, rather than treating ordinary HTTPS access as sufficient.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the new commit. Agreed — HTTPS reachability and WebSocket availability are distinct egress capabilities. The record now (1) adds WebSocket-capable egress as an explicit supported-environment criterion for the relay role, naming the HTTPS-only/WebSocket-blocked case as a real coverage gap that falls to #5671's other tiers; (2) corrects the polling alternative: it is rejected as this component's primary shape on latency/metering grounds only, and stays a live candidate for a parent-level last-ditch tier covering that gap; (3) notes the rendezvous role is plain HTTPS and unaffected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

id: design: Cloudflare Workers rendezvous/relay component (from #5671)

1 participant